function getHeaders(raw) {
  let headers = []
  raw.split("\n").forEach((line) => {
    let kv = line.split(":")
    if (kv.length === 2) {
      headers.push({
        k: kv[0],
        v: kv[1]
      })
    }
  })
  return headers
}

const req_raw = "GET /tiangao HTTP/1.1\n" +
  "Host: gitee.com\n" +
  "Connection: keep-alive\n" +
  "Cache-Control: max-age=0\n" +
  "sec-ch-ua: \"Not)A;Brand\";v=\"99\", \"Google Chrome\";v=\"127\", \"Chromium\";v=\"127\"\n" +
  "sec-ch-ua-mobile: ?0\n" +
  "sec-ch-ua-platform: \"macOS\"\n" +
  "Upgrade-Insecure-Requests: 1\n" +
  "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36\n" +
  "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\n" +
  "Sec-Fetch-Site: same-origin\n" +
  "Sec-Fetch-Mode: navigate\n" +
  "Sec-Fetch-User: ?1\n" +
  "Sec-Fetch-Dest: document\n" +
  "Referer: https://gitee.com/projects/new\n" +
  "Accept-Encoding: gzip, deflate, br, zstd\n" +
  "Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,fr;q=0.7,zh-TW;q=0.6\n" +
  "Cookie: sensorsdata2015jssdkchannel=%7B%22prop%22%3A%7B%22_sa_channel_landing_url%22%3A%22%22%7D%7D; user_locale=zh-CN; oschina_new_user=false; user_return_to_0=%2F; tz=Asia%2FShanghai; gitee_user=true; close_wechat_tour=true; remote_way=ssh; Hm_lvt_dbba4dc235af9a121ecb9ae949529239=1710568373; Hm_lvt_3c2fefed4f66d99b4c26719f79cee62b=1710568446; Hm_lpvt_dbba4dc235af9a121ecb9ae949529239=1710570431; Hm_lpvt_3c2fefed4f66d99b4c26719f79cee62b=1710575540; Hm_lvt_7c23f993f2422aa7060ac5b51ecf6ace=1714323828; Hm_lpvt_7c23f993f2422aa7060ac5b51ecf6ace=1714323828; yp_riddler_id=38a831a8-38b9-4310-aa14-c050463a5694; HMACCOUNT=50309DB6E759A7B9; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%22130007%22%2C%22first_id%22%3A%2218d82a8027f10c0-0d6289843fc591-1f525637-1405320-18d82a802802697%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMThkODJhODAyN2YxMGMwLTBkNjI4OTg0M2ZjNTkxLTFmNTI1NjM3LTE0MDUzMjAtMThkODJhODAyODAyNjk3IiwiJGlkZW50aXR5X2xvZ2luX2lkIjoiMTMwMDA3In0%3D%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%24identity_login_id%22%2C%22value%22%3A%22130007%22%7D%2C%22%24device_id%22%3A%2218d82a8027f10c0-0d6289843fc591-1f525637-1405320-18d82a802802697%22%7D; visit-gitee--2024-09-19=1; project_pr_sort=closed_at+desc; Hm_lvt_24f17767262929947cc3631f99bfd274=1728912975; remove_bulletin=gitee-maintain-1726831349; Hm_lvt_9d6fe34cca29df0facbfbf9537594198=1730052586; Hm_lpvt_9d6fe34cca29df0facbfbf9537594198=1730053029; visit-gitee--2024-10-28=1; BEC=1f1759df3ccd099821dcf0da6feb0357; csrf_token=uHeRhjTKv84%2Fsf5RSirSFGxvyX0fKtm%2F8wWzxXjlpqd8rITz98pqkwLi%2BGo3qcXxsttwzw5H9057H%2FFdaa6VPg%3D%3D; sl-session=5cDKassFJWdPMrsnrw/X3g==; Hm_lpvt_24f17767262929947cc3631f99bfd274=1730393168; gitee-session-n=bndlbWpYdGNtTU52RkY2Z2xyQU5Fbm0vTEErUlUxcVZyemZUOVFvcFcvTGYrZHFMUzUvdWIwUVFkS3Q5TmphT1ZuTmM1bWNDUUF0WTBmK3Vxd0J2K0RLemIrSVpsbmZyNGlGWExBVlR2eDRNMDAzK01XR0dTUGQ0cXVhWWpickh0WUZ1WTFXNnprYndHalhWemVZNmk0dHovMG1zWDJ0ZnMrSlM3dHdKZ0VLSnFnd1NwcURpN0FTU1oxWGp6bkVoeFFRNzBkSnlaeHEyeTNScE94ZU9yY0FqTFZPekJaQUpoNThlWWVpa1JFcWRsZTFkTnZKamc3dDB3WXdqeVJHZ0JCSkE5V0xxWUsrRDU0Z2JHTDVpWW81ZmdVVWs1Skt3WDNFRUxFV0taWnZmQkxhOHVwRWZMeGVXMnovekk5c3lrMllsMFJyZkRwQ1hWRVE0czFUUll0WUUvZXlxdUNiOVZMNmNHc0VGSStCMGpJYXIyeTZpUTZJUTZZOGU2ajE5akc1WmRBUmV2MTBjdWpTTFQwMjhkMHp4ZzZ2a3A4UmZIc2tDRHdnRzVqamhBeGxDUVE0M0VkOTRjWDdHSFBrRGV3RU5MVG1QTUY5Vzl2eWJGNDMxcitxMHVCcERRenJOVWdNUFlUR0o5eXVMM09JRDFmVkZldHJjRTRORmxZQytwOFpSY2IzNnpCMEw1YW1VMHB6VnNGcEZsTnhiYmR0WGVoc1U0TDNCQnNFeFBKd1VPZ0VYenV6Y0s3dEtBbUM0ZjNNZWZXZng4MmZVSllGcXp0TUwzckJyOFU5RkFHakZKQ2UwUXlIZTNrbERUblorR09vTm14QjAwTUpRakRqZS0tMUVyQjRjYUxVZDY0N3NneEdvM3BYdz09--2b8d69afc481046197880d5667acecbf1566c103\n"

const res_raw = "HTTP/1.1 200 OK\n" +
  "Server: ADAS/1.0.201\n" +
  "Date: Thu, 31 Oct 2024 16:46:34 GMT\n" +
  "Content-Type: application/json; charset=utf-8\n" +
  "Transfer-Encoding: chunked\n" +
  "Connection: keep-alive\n" +
  "Vary: Accept-Encoding\n" +
  "X-XSS-Protection: 1; mode=block\n" +
  "X-Content-Type-Options: nosniff\n" +
  "X-UA-Compatible: chrome=1\n" +
  "Expires: Sun, 1 Jan 2000 01:00:00 GMT\n" +
  "Pragma: must-revalidate, no-cache, private\n" +
  "Cache-Control: no-cache\n" +
  "Set-Cookie: oschina_new_user=false; path=/; expires=Mon, 31 Oct 2044 16:46:34 -0000\n" +
  "Set-Cookie: gitee-session-n=RUdySE9RaHp6SmlyZkYwREFrMDdnNDRkdUUxWnpIbnJWL0F3WXVSNTNUdnp0N2M5UG5FbWNTb3FNMXB2WUczYW55RWxLaVQ1R3lUZWgyVW1IcWdjNStGNUVTT2R0MVVQZEpaM29JaDVyK0MvM1AyVHVEUGI2amVrR3RnUDZwUCszRzd4QWJvdHZHeTg2ZW5pb283MDBOV3VESUtYajgvZ2ljTEkrSE9KZk1ZVHo0Z0Qxbkp1ck1jRzg5amVadlVEKzRSTExJYnA2eWREVjdXVURuVXVZOTQzd2ZQazF5M3hXL1dZQ3N5eXRGT0M5YU51LzhHYkhmTWRsZDBkVnBZcGtUaXZoaFV0YzJ5Q0EwZDlDSDBWUjh3VXR4MEltQzNmalBmQzMvalBibERxbVIvUGtDOUxVYW5yZkVWVHJTeE9vRFgzWW83cTQveXVTYTR5cHF2QVRQbG5NNlR6N2JlSWNwZm4wOUVNQ25UeGZZcUpZNTA1akJRbTdPS05OUmE2TGMweHVEUnVQMGxZUlcvbFRxVU4wL1J6Ymozb2xjeGVlQWJzbEE5ejZTV1BXWndFQitJRkRLTTJWeGgvS3BCUUh4OXFKWUxVdncvTkdZSXJKWGs0c1o2V0FvVzdGOXErRjVkYlFNWjZYaXl4dTFHWkZ0eFhDM01HSFZ6NzhCeTQ4OG1OUWJDV0lTc3czNEFrZ2l1Zldwb216RStJc054VFQ3MXdURms5b29XWU8reCtuR3VSUnZ6TTh6MjJwNHpNbFZOWlJNVFBQa1pOY3BFZTdJbTA2TmtPTm1CblN3WC9rdlcyUXlud0d1SFF1MTZBbDdYMWRBNWFNcW14b05BRC0tb05WOXhaMGlkNllEeFNxbkJBSXhRUT09--335200d71bd835e8d0f7fb6f23302b02acbfaeb8; domain=.gitee.com; path=/; HttpOnly\n" +
  "X-Request-Id: 187df750e6574582df3f6602f33e7805\n" +
  "X-Runtime: 0.021693\n" +
  "Vary: Origin\n" +
  "X-Frame-Options: SAMEORIGIN\n" +
  "Content-Security-Policy: frame-ancestors 'self' https://*.gitee.com\n" +
  "Content-Encoding: gzip\n"

export const demo_data =
  {
    request: {
      method: "GET",
      raw: req_raw,
      headers: getHeaders(req_raw)
    },
    response: {
      raw: res_raw,
      headers: getHeaders(req_raw),
      body: "{\"status\":200,\"data\":{\"id\":10,\"noti_level\":0,\"image_url\":\"https://foruda.gitee.com/images/1686912374721555501/639dc6e9_551147.png\",\"url\":\"https://help.gitee.com/issue/templates\",\"title\":\"Issue 表单模式来袭\",\"content\":\"\u003Cul\u003E\\n\u003Cli\u003E提交 Issue，填表就好\u003C/li\u003E\\n\u003Cli\u003E内容必填选填？你说了算！\u003C/li\u003E\\n\u003Cli\u003E精准反馈，高效沟通\u003C/li\u003E\\n\u003C/ul\u003E\"},\"message\":null}"

    }
  }
